package com.baizhi.service.Impl;

import com.baizhi.dao.OptionDao;
import com.baizhi.entity.Option;
import com.baizhi.service.OptionService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional
public class OptionServiceImpl implements OptionService {
    @Autowired
    private OptionDao od;
    @Override
    public List<Option> selectOption(int id) {
        QueryWrapper  a =new QueryWrapper();
        a.eq("title_id",id);
        return od.selectList(a);
    }

    @Override
    public List<Option> selectGroup(int id) {
        return od.selectVote(id);
    }

}
